<template>
  <div>
    <div
      style="
        background-color: rgb(249, 249, 249);
        width: 100%;
        height: 50px;
        display: flex;
        justify-content: space-between;
        align-items: center;
      "
    >
      <div style="width: 70%; display: flex">
        <div>
          <img
            src="../../assets/img/xiaoshou005.png"
            alt=""
            style="width: 70px; height: 55px; margin-top: 2px"
          />
        </div>
        <div style="font-size: 24px; margin-top: 17px; margin-left: 10px">
          合同收款
        </div>
      </div>
      <div style="width: 30%">
        <div>
          <img
            src="../../assets/img/sq.png"
            alt=""
            style="background-color: rgb(200, 200, 200); float: right"
          />
        </div>
      </div>
    </div>
    <div style="display: flex; margin-top: 10px; flex-direction: row-reverse">
      <div>
        <el-input
          placeholder="请输入内容"
          prefix-icon="el-icon-search"
          v-model="input"
          size="mini"
        >
        </el-input>
      </div>
      <div>
        <el-button size="mini">高级搜索</el-button>
      </div>
    </div>
    <div style="margin-top: 10px">
      <el-table :data="tableData" style="width: 100%">
        <el-table-column prop="contractNumber" label="合同编号" width="160">
        </el-table-column>
        <el-table-column prop="contractName" label="合同名称">
        </el-table-column>
        <el-table-column prop="personInCharge" label="负责人"> </el-table-column>
        <el-table-column prop="customerName" label="客户名称"></el-table-column>
        <el-table-column prop="founder" label="创建日期">
        </el-table-column>
        <el-table-column prop="contractPrice" label="合同金额">
        </el-table-column>
        <el-table-column prop="contractStatus" label="合同状态">
              <template slot-scope="scope">
                <el-tag
                  :type="
                    scope.row.contractStatus === '未激活'
                      ? 'warning'
                      : 'success'
                  "
                  >{{ scope.row.contractStatus }}</el-tag
                >
              </template>
            </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import { selectContractAll } from "../../api/sales"
export default {
  mounted() {
    this.selectContractAll();
  },
  data() {
    return {
      tableData: []
    };
  },
  methods: {
    selectContractAll() {
      selectContractAll().then((res) => {
        console.log(res);
        this.tableData = res.result;
      });
    },
  },
};
</script>

<style>
</style>